<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>#{msgs.PageTitle}</title>
    </h:head>
    <h:body>
        <div align="center">
            <p:panelGrid columns="1" style=" width: 270px;">
                <f:facet name="header">
                    Login
                </f:facet>

                <h:panelGroup rendered="#{!empty param.login_error}">
                    <span style="color: red">Erro ao efetuar o login.</span>
                    <br />
                    Motivo: #{SPRING_SECURITY_LAST_EXCEPTION.message}
                </h:panelGroup>

                <form id="login" method="post" action="#{request.contextPath}/j_spring_security_check">
                    <h:panelGrid columns="2">
                        <h:outputLabel value="Login"/>
                        <input type="text" name="j_username"/>
                        <h:outputLabel value="Senha"/>
                        <input type="text" name="j_password"/>
                        <h:panelGroup>
                            <input type="submit" value="Entrar"/>
                        </h:panelGroup>
                    </h:panelGrid>
                </form>
            </p:panelGrid>
        </div>
    </h:body>
</html>

